<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="PageAddEdit.ascx.cs" Inherits="IGlobalist.Cms.Admin.Control.PageAddEdit" %>
<%@ Register Src="CmsExtPropertiesForm.ascx" TagName="CmsExtPropertiesForm" TagPrefix="uc1" %>

  <table>
  <tr>
    <th colspan="2" align="center">
        <asp:Label runat="server" ID="lblStatus" ForeColor="#1A5688" Font-Bold="True" Font-Size="Medium"/>
    </th>        
  </tr>
  <tr>
    <td align="left">
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" ShowMessageBox="True"  />
    </td>
  </tr>
    <tr>
        <td valign="top">
        <fieldset id="fsMain" runat="server">
            <legend><asp:Label ID="lblMain"  runat="server"  Text="Page info"></asp:Label> </legend>
                <table cellpadding="2" cellspacing="2">
                    <tr>
                        <td><asp:Label ID="Label1" runat="server" Text="Page class"></asp:Label></td>
                        <td>
                            <asp:DropDownList ID="ddlClassPage" runat="server"  Enabled="False" AutoPostBack="true" OnSelectedIndexChanged="ddlClassPage_SelectedIndexChanged" DataSourceID="ODSClassPage" DataTextField="Name" DataValueField="ID" >
                            </asp:DropDownList><asp:ObjectDataSource ID="ODSClassPage" runat="server" SelectMethod="GetClassListByClassTypeID"
                                TypeName="IGlobalist.Cms.Bll.ClassController">
                                <SelectParameters>
                                    <asp:Parameter DefaultValue="3" Name="classTypeID" Type="Int16" />
                                </SelectParameters>
                            </asp:ObjectDataSource>
                        </td>
                    </tr>
                    <tr>
                        <td style="height: 28px"><asp:Label ID="lblName" runat="server" Text="Name"></asp:Label></td>
                        <td style="height: 28px"><asp:TextBox ID="tbName" runat="server" ></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="Must enter name" ControlToValidate="tbName" >*</asp:RequiredFieldValidator>                             
                            <asp:Label ID="lblError" runat="server" Text="" ForeColor="red">
                                </asp:Label> 
                        </td>
                    </tr>
                    
                    <tr>
                        <td><asp:Label ID="Label5" runat="server" Text="Order"></asp:Label></td>
                        <td><asp:TextBox ID="tbOrder" runat="server"  Text="0" MaxLength="3"></asp:TextBox><asp:RangeValidator ID="RangeValidator11" runat="server" ControlToValidate="tbOrder"
                            ErrorMessage="Order must be number" MaximumValue="999" MinimumValue="0" Type="Integer">*</asp:RangeValidator>
                       </td>
                                
                    </tr>
                    
                    <tr>
                        <td><asp:Label ID="Label7" runat="server" Text="Type"></asp:Label></td>
                        <td>
                            <asp:DropDownList ID="ddlType" runat="server">
                                <asp:ListItem Selected="True" Value="1">News</asp:ListItem>
                                <asp:ListItem Value="2">Product</asp:ListItem>
                                <asp:ListItem Value="3">Gallery</asp:ListItem>
                                <asp:ListItem Value="4">Login</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    
                     <tr>
                        <td><asp:Label ID="Label8" runat="server" Text="Show"></asp:Label></td>
                        <td>
                            <asp:CheckBox ID="cbHidden" runat="server" />
                        </td>
                    </tr>
                    
                    <tr>
                        <td><asp:Label ID="Label4" runat="server" Text="Parent page "></asp:Label></td>
                        <td>
                              <asp:DropDownList ID="ddlPage" runat="server" DataTextField="Name" DataValueField="ID" DataSourceID="ODSPage"  >
                            
                              </asp:DropDownList><asp:ObjectDataSource ID="ODSPage" runat="server" SelectMethod="GetPageListForBindTree"
                             TypeName="IGlobalist.Cms.Bll.PageController">
                             <SelectParameters>
                                 <asp:Parameter DefaultValue="0" Name="classID" Type="Int64" />
                                 <asp:ControlParameter DefaultValue="0"  ControlID="hdfPageID" Name="currentID"  PropertyName="Value" Type="Int64" />
                             </SelectParameters>
                         </asp:ObjectDataSource>
            
                        </td>
                    </tr>  
                    <tr>
                        <td valign="top"><asp:Label ID="Label2" runat="server" Text="Title"></asp:Label></td>
                        <td><asp:TextBox ID="tbDescription" runat="server" Rows="4" Height="80px" TextMode="MultiLine" Columns="40" ></asp:TextBox></td>                       
                    </tr>                                       
                    <tr>
                        <td valign="top">
                        Select Template
                        </td>
                        <td valign="top">
                        <asp:DropDownList ID="ddlTemplate" runat="server"></asp:DropDownList>
                        </td>
                    </tr>                   
                    <tr>
                        <td valign="top">
                        Select category
                        </td>
                        <td>
                           <table>                           
                           <tr>
                           <td valign="top">
                        <asp:TreeView ID="tvCategory" runat="server" ShowCheckBoxes="All" Visible="true"></asp:TreeView></td>
                           <td valign="top">
                        <asp:TreeView ID="tvCatPageType" runat="server" ShowCheckBoxes="All" Visible="false">
                            </asp:TreeView>   
                           </td>
                           </tr>
                           </table>
                        </td>
                    </tr>                                         
                  <tr>
                    <td valign="top"><asp:Label ID="Label3" runat="server" Text="KeyWords"></asp:Label></td>
                    <td><asp:TextBox ID="tbKeyWords" runat="server" Rows="4" Height="100px" TextMode="MultiLine" Columns="40" ></asp:TextBox></td>                       
                </tr>  
               </table>   
                
        </fieldset> 
        </td>
    </tr>
    <tr>
        <td>
            <fieldset id="fsExt" runat="server">
            <legend><asp:Label ID="lblExt"  runat="server"  Text="Ext Properties"></asp:Label> </legend>               
                <uc1:CmsExtPropertiesForm ID="ucCmsExtPropertiesForm" runat="server" />
            </fieldset>
        </td>
    </tr>
    <asp:Panel ID="pnlContent" runat="server" Visible="false" >
    <tr>
        <td>
            <fieldset id="Fieldset1" runat="server">                            
                <asp:LinkButton ID="lbtnCategory" runat="server" OnClick="lbtnCategory_Click" Visible="false">Category list</asp:LinkButton>
                <br />
                <asp:LinkButton ID="lbtnContent" runat="server" OnClick="lbtnContent_Click">Content list</asp:LinkButton></fieldset> 
        </td>
    </tr>
    
    </asp:Panel>
    </table>
     
 
<asp:HiddenField runat="server" ID="hdfClassID" Value="0" />
<asp:HiddenField runat="server" ID="hdfPageID" Value="0" />

